#!/bin/bash

#### PBS preamble

#PBS -l nodes=1:ppn=8,pmem=4gb,walltime=2:00:00
#PBS -o out.txt
#PBS -e err.txt
#PBS -N chimad_bp2a
#PBS -V
#PBS -A kthorn_flux
#PBS -q flux
#PBS -l qos=flux

# End PBS Settings
###############################

#  Change to the directory you submitted from
if [ -n "$PBS_O_WORKDIR" ]; then cd $PBS_O_WORKDIR; fi

mkdir /scratch/kthorn_flux/dmontiel/CH_electrostatics_bp_2a/

cp main /scratch/kthorn_flux/dmontiel/CH_electrostatics_bp_2a/
cp parameters.in /scratch/kthorn_flux/dmontiel/CH_electrostatics_bp_2a/

cd /scratch/kthorn_flux/dmontiel/CH_electrostatics_bp_2a/

# For mpi run
mpirun -n 8 ./main
